// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import $http from './api/index.js'
import VueLazyLoad from 'vue-lazyload'
import Vuex from 'vuex'
import VueAwesomeSwiper from 'vue-awesome-swiper'
import MintUi from 'mint-ui'
import YDUI from 'vue-ydui'; /* 相当于import YDUI from 'vue-ydui/ydui.rem.js' */
import 'mint-ui/lib/style.css'
import 'vue-ydui/dist/ydui.rem.css';
require('swiper/dist/css/swiper.css')
require('./assets/css/base.css'); //全局引入
Vue.use(VueAwesomeSwiper)
Vue.use(MintUi)
Vue.use(Vuex)
Vue.use(YDUI);
Vue.use(VueLazyLoad, {
	error: require('./assets/images/err.png'),
	loading: require('./assets/images/loading.gif'),
})
const vuex_store = new Vuex.Store({
	state: {
		user_name: ""
	},
	mutations: {
		showUserName(state) {
			alert(state.user_name);
		}
	}
})
Vue.config.productionTip = false
Vue.prototype.$http = $http
Vue.prototype.root = $http.root
/* eslint-disable no-new */
new Vue({
	el: '#app',
	store:vuex_store, //注入到vue
	router,
	components: {
		App
	},
	template: '<App/>'
})